home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Presentations / Presentations ’92 / Chris Haupt (tcpæ) / tcpæ Ultrix⁄RISC Client (done) / tcpae.h < prev   
Encoding:
C/C++ Source or Header  |  1992-06-16  |  1.9 KB  |  58 lines  |  [TEXT/ALFA]

  1. /*
  2. ** Header: tcpae_client.h
  3. **    - contains the interface to the tcpae client software
  4. **  - the API constants are not located in this client release, contact chris
  5. **        if you are interested in developing your own API implementation
  6. ** Author: cf haupt (c) 1992, All rights Reserved
  7. ** Modified:
  8. **    13-jun-1992 -- upgraded to conform to paper spec
  9. */
  10.  
  11. #pragma once
  12.  
  13. /************************************************************************/
  14. /* constants */
  15.  
  16. /* result codes*/
  17. #define noErr                   0
  18. #define kNoHost                 -1
  19. #define kNoContext              -2
  20. #define kRemoteNotAnswer        -3
  21. #define kCantOpenOutput         -4
  22. #define kCantOpenInput          -5
  23. #define kMaxLink                -6
  24. #define kBadPacket                -7
  25. #define kBadResult                -8
  26. #define kInvalidContext            -9
  27.  
  28. /* filterFlags returned in TCPAEGateStatus StatusRec.filterFlags */
  29. #define     kAccessFilter       0x01
  30. #define     kAEAppFilter        0x02
  31. #define     kAEEvtFilter        0x04
  32. #define     kAETypFilter        0x08
  33.  
  34. /************************************************************************/
  35. /* type & structures */
  36.  
  37. /* Macintosh equiv types */
  38. typedef long int OSType, OSErr;
  39.  
  40. /* the status buffer returned by TCPAEGateStatus */
  41. typedef struct _StatusRec
  42. {
  43.     short   version;        /* version of protocol          */
  44.     short   filterFlags;    /* is event filtering active? */
  45.     long    packetsServed   /* number of packets served via gateway*/
  46. } StatusRec;
  47.  
  48. /************************************************************************/
  49. /* prototypes */
  50. OSErr    TCPAEInit(void);
  51. OSErr    TCPAEOpenGate (short int *context, char *dottedHost);
  52. OSErr    TCPAECloseGate(short context);
  53. OSErr    TCPAEGateStatus(short context, StatusRec *rec);
  54. OSErr    TCPAESendOAPP(short context, char *target);
  55. OSErr    TCPAESendQUIT(short context, char *target);
  56. OSErr    TCPAESendDOSC(short context, char *target, char *buffer);
  57.  
  58.